//
//  XLOrginaTableViewCell.swift
//  WeiBo
//
//  Created by macbook on 16/10/19.
//  Copyright © 2016年 buWangChuXing. All rights reserved.
//

import UIKit

class XLOrginaTableViewCell: UITableViewCell {
    
    
    var status = XLStatus?(){
    
        didSet{
        
            //给原创微博赋值
            orginaView.status = status
        }
    }
    
    
    
    
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        setupUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setupUI()
    {
        self.backgroundColor = UIColor.whiteColor()
        contentView.addSubview(orginaView)
        
        //添加约束
        orginaView.snp_makeConstraints { (make) in
            
            make.top.left.right.equalTo(contentView)
            
        }
        
        //约束自己
        contentView.snp_makeConstraints { (make) in
            
            make.top.leading.trailing.equalTo(self)
            make.bottom.equalTo(orginaView)

        }
        
    }
    
    //懒加载子控件
    private lazy var orginaView:XLStausOrginaView = XLStausOrginaView()
    
    

}











